A code decoded

A row of dashes and a row of digits. Wherever you look – it’s there. The bar code, as it is called, is celebrating its 50th anniversary this year! What does it hide within? And how much longer will it serve us?

In the 1990s in Poland, it was very popular to collect barcodes starting with the number 4. Thousands of codes were later to be redeemed for a wheelchair. For whom – no one knows how many specific codes had to be collected – is also unknown. The frenzy to cut these signs out of packages spread among many people, because, it seemed, it was a simple way to help. In the process, we found out that at the time the four on the front meant the goods came from Germany.

Today, it’s pointless to look online for information on whether these collections had any effect. Certainly, however, the society of fledgling capitalism has become accustomed to the invention of the bar code. In Poland, the first codes conforming to the GS1 standard were implemented in 1990, when foreign retail chains entered our market.

Lines in the sand

On June 26, 1974, a multipack of Wrigley’s Juicy Fruit chewing gum marked with a bar code passed through the cash register at Marsh Supermarket in the American town of Troy. Today we would say: a standard store activity. At the time, however, it was a groundbreaking event, as the chewing gums were the first goods with a bar code to be scanned at the checkout. Clyde Dawson, who made the purchase and was also head of research and development for the Marsh Supermarket chain, later explained that he wasn’t sure if it would be possible to put the barcode on a single pack of chewing gum, so he chose a multipack.

The UPC (Universal Product Code) barcode itself had been officially approved a year earlier. But it took more than 40 years of research (since 1928) before it took over global commerce. And they began… with the cash register. And more specifically – the need to speed up customer service in supermarkets while simultaneously controlling the inventory.

The first bar codes were circular and resembled a shooting target in appearance. It was only later that Woodland and Silver decided to change their shape – first to four parallel dashes and then to ten, as this gave the possibility to encode more data.

The first barcodes weren’t printed on packaging by manufacturers but were pasted in stores. And manufacturers and distributors slowly came to the conclusion that life would be simpler if the codes were standardized. And so, in 1973 the Universal Product Code was created. This code standard was introduced in the United States and Canada.

Europe worked on its standard, and so in 1976 the European Article Numbering (EAN) commodity coding system was created. Fifteen years later it evolved into an international one. Poland joined the EAN system in 1990. At the Poznań-based Institute of Logistics and Warehousing (which today is part of Łukasiewicz – PIT), a Barcode Center was established, which granted the relevant authorizations to all Polish companies wishing to identify and code products in accordance with the global standard (today this is handled by the GS1 Poland Foundation). In 2005, the EAN standard was officially renamed GS1.

What does a code consist of?

If one were to look at the objects around us, one would notice that the codes printed or pasted on them differ – in size, number of digits, and shape. There are about 250 types of codes and several ways to divide them. We can divide them according to the width of the lines, the format of the coded information (numeric and alphanumeric), the number of coded characters or dimensions.

The most popular code in the GS1 standard is the EAN-13 code, as it is widely used in retail. It consists of a row of lines, under which there is a sequence of thirteen digits, which constitute GTIN-13, Global Trade Unit Number. What is behind it?

The first three digits are the prefix of the national GS1 organization, of which there are more than 100 in the world. For example, the organization in Poland has a prefix of 590, in Germany – from 400 to 440, in France – from 300 to 379, in the UK – from 500 to 509, in Slovakia – 858, in the Czech Republic – 859, and in Bolivia – 777. When we buy goods with an EAN-13 code starting with 500, we can’t be in any way sure that it was produced in the UK, but only – that it was registered with the British barcode organization.

The prefix of the national GS1 organization is followed by the manufacturer’s or trademark owner’s number of the product – it has a varying length – and the product number, the length of which depends on the number of digits in the manufacturer’s number. The last, thirteenth, digit of the GTIN-13 is the check digit.

If the 13-digit number begins with a two, it means that we are dealing with a variable-weight commodity, or an indication for internal use within a single organization. In contrast, publishers, such as newspapers or magazines, still have an ISSN number above the EAN-13 code, and books have an ISBN. If an item has a small package on which the EAN-13 will not fit, a shorter, eight-digit version is used – the EAN-8 representing the GTIN-8 number.

Every day, 6 billion products labeled with EAN-13 are scanned worldwide.

In many cases there is a need to put more information about the product in the barcode – for example, its serial number, net weight, production lot designation or expiration date. In that case, you need to use more elaborate codes. One of them is GS1-128, which allows you to encode information in both numeric and alphanumeric formats. This marking is most often used in storage, distribution and transportation, it’s rather unlikely to find it on goods bought in a store. There we may come across GS1 DataBar, which usually consists of two or three rows of dashes and a single string of characters. GS1 DataBar also allows you to encode more data, but unlike GS1-128 it is also used in retail.

How about a square?

The codes described earlier are one-dimensional. So it’s time to move on to the second dimension, namely matrix codes – GS1 DataMatrix and GS1 QR, mistakenly thrown together under the title of QR codes. They look similar (both consist of black and white squares), but the devil is in the details.

DataMatrix was created in 1987, and QR seven years later. So they are a much younger sibling of the linear code, bearing little resemblance to it, but being more modern. That’s because they make it possible to encode large amounts of data. The former encodes up to 2335 characters in the form of code words. QR (from Quick Response) gives us more possibilities, including encoding in different languages (such as Japanese, Arabic or Polish, including diacritical marks). It holds 4296 alphanumeric characters or 7089 digits, or 2953 bytes (binary data, such as a photo, can be encoded in it). A cell phone is enough to read it.

How to recognize them at a glance? The QR code contains three squares in the corners, DataMatrix has lines along the left and bottom edges, forming the letter L.

The barcode giant

The BBC called the GTIN, or number stored in a barcode, “one of the 50 things that created the modern economy.” The codes were meant to streamline customer service and became one of the tools that created the global circulation of goods. The ability to read product data quickly proved revolutionary. Barcodes, thanks to their simplicity and diversity, allow us to encode all the information needed. Thus they are widely used, not only in trade or logistics. They are cheap, can be easily printed and can be placed on almost anything.

They are great for taking inventory – whether of goods in a warehouse or company equipment, for example. In one of the “About Technology Out Loud” podcasts, Dr. Anna Gawronska of Łukasiewicz – PIT talked about their use in hospitals to identify patients. Scanning data from patients’ wristbands in combination with electronic medical orders will help avoid many errors with administering medications. This is because they account for 20 percent of all errors made at hospitals. “Studies have shown that manual data entry via a keyboard results in one error per 100 characters, and barcode scanning results in one error per 10 million characters,” Dr. Anna Gawronska explained in a podcast (the entire interview is available here).

In contrast, two-dimensional codes (especially QR codes) also allow consumers to easily access additional information about a product or service. Simply scanning a code on a package with your phone can, for example, display an item’s instruction manual, or a code on a poster advertising a concert can take you straight to the site where you can buy a ticket for it.

Will the future belong to 2D codes? In 2020, the international organization GS1 has launched a coalition of industry leaders to introduce 2D codes worldwide and replace traditional barcodes. So let’s celebrate their 50th anniversary, because in another half century they may already become a part of history.

At Łukasiewicz – PIT we know a thing or two about barcodes! We offer a comprehensive code verification service, which includes, among other things: validation of codes, professional advice, identification and repair of errors and generation of reports with verification results. Check out our offer here.